package com.tpp.threat_perception_platform.dao;

import com.tpp.threat_perception_platform.param.MyParam;
import com.tpp.threat_perception_platform.pojo.Host;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author yokui
* @description 针对表【host(主机表)】的数据库操作Mapper
* @createDate 2025-06-06 13:01:23
* @Entity com.tpp.threat_perception_platform.pojo.Host
*/
public interface HostMapper {

    int deleteByPrimaryKey(Long id);
    /**
     * 删除数据
     * @param ids
     */
    void delete(@Param("ids") Integer[] ids);

    int insert(Host record);

    int insertSelective(Host record);
/*
     * 根据mac地址查询主机信息
     * @param macAddress
     * @return
 */
    Host selectByPrimaryKey(Long id);
    Host selectByMacAddress(String macAddress);
    int updateByPrimaryKeySelective(Host record);

    int updateByPrimaryKey(Host record);
    int updateByMacAddress(Host host);
    /**
     * 查询所有的角色
     * @param param
     * @return
     */
    List<Host> findAll(@Param("param") MyParam param);
    List<Host> findAllOnlyWithMacAndHostname();

    int updateSycByMacAddress(Host host);

    int selectCountbyStatus(Integer status);

    List<String> selectOsName();
}
